package org.hk.basic;

public class Test {

    Test2 test2 = new Test2();
    public Test(){
        System.out.println("1构造");
    }
    public static int initx(){
        System.out.println("2返回静态成员变量需要的值");
        return 5;
    }

    public static int x = initx();
    static {
        System.out.println("4.静态代码块输出");
    }
    {
        System.out.println("5.普通代码块");
    }
    class Test2{
        public Test2(){
            System.out.println("3test2构造");
        }
    }

    public static void main(String[] args) {
        new Test();
    }
}
